# 第4节 数的全排列

if __name__ == '__main__':
    for a in range(1, 4):
        for b in range(1, 4):
            for c in range(1, 4):
                if a != b and a != c and b != c:
                    print('%d%d%d' % (a, b, c), end=' ')
